Hello,

I have downloaded targa2.c and tried to compile it with gcc compiler under cygwin (CYGWIN_NT-5.1). I checked all the header files, and everything is fine.

targa2.c can be found here: http://sokrates.mimuw.edu.pl/~sebek/pub/targa.c)

Code:
$gcc -Wall targa2.c -o targa

targa2.c:340: error: field `ip' has incomplete type
targa2.c:346: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:347: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c: In function `fondle':
targa2.c:388: error: structure has no member named `source'
targa2.c:389: error: structure has no member named `dest'
targa2.c:390: error: structure has no member named `len'
targa2.c: In function `bonk':
targa2.c:420: error: `IP_HDRINCL' undeclared (first use in this function)
targa2.c:420: error: (Each undeclared identifier is reported only once
targa2.c:420: error: for each function it appears in.)
targa2.c: In function `jolt':
targa2.c:453: error: `IP_HDRINCL' undeclared (first use in this function)
targa2.c:489: error: dereferencing pointer to incomplete type
targa2.c:489: error: `ICMP_ECHO' undeclared (first use in this function)
targa2.c:490: error: dereferencing pointer to incomplete type
targa2.c:491: error: dereferencing pointer to incomplete type
targa2.c:507: error: dereferencing pointer to incomplete type
targa2.c:508: error: dereferencing pointer to incomplete type
targa2.c:509: error: dereferencing pointer to incomplete type
targa2.c: At top level:
targa2.c:519: error: conflicting types for 'tcp_seq'
/usr/include/netinet/tcp.h:49: error: previous declaration of 'tcp_seq' was here
targa2.c: In function `land':
targa2.c:573: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:592: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:593: error: dereferencing pointer to incomplete type
targa2.c:594: error: dereferencing pointer to incomplete type
targa2.c:594: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:595: error: dereferencing pointer to incomplete type
targa2.c:595: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:596: error: dereferencing pointer to incomplete type
targa2.c:597: error: dereferencing pointer to incomplete type
targa2.c:598: error: dereferencing pointer to incomplete type
targa2.c:599: error: dereferencing pointer to incomplete type
targa2.c:600: error: dereferencing pointer to incomplete type
targa2.c:618: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c: In function `nestea':
targa2.c:647: error: `IP_HDRINCL' undeclared (first use in this function)
targa2.c: In function `newtear':
targa2.c:830: error: `IP_HDRINCL' undeclared (first use in this function)
targa2.c: In function `syndrop':
targa2.c:957: error: `IP_HDRINCL' undeclared (first use in this function)
targa2.c: In function `teardrop':
targa2.c:1092: error: `IP_HDRINCL' undeclared (first use in this function)
targa2.c: In function `sub_1234':
targa2.c:1329: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:1330: error: invalid application of `sizeof' to incomplete type `icmphdr'
targa2.c:1332: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:1333: error: invalid application of `sizeof' to incomplete type `iphdr'
targa2.c:1333: error: invalid application of `sizeof' to incomplete type `icmphdr'
targa2.c:1334: error: dereferencing pointer to incomplete type
targa2.c:1335: error: dereferencing pointer to incomplete type
targa2.c:1336: error: dereferencing pointer to incomplete type
targa2.c:1337: error: dereferencing pointer to incomplete type
targa2.c:1338: error: dereferencing pointer to incomplete type
targa2.c:1339: error: dereferencing pointer to incomplete type
targa2.c:1340: error: dereferencing pointer to incomplete type
targa2.c:1341: error: dereferencing pointer to incomplete type
targa2.c:1342: error: dereferencing pointer to incomplete type